Texture2D baseTexture : register(t0);
SamplerState baseTextureSS : register(s0);

#include "states.fx"

cbuffer cbPerObject
{
	float4x4 worldViewProjection;
};

struct VS_INPUT
{
   float4 position : POSITION;
   float2 UV1 : TEXCOORD0;
};

struct VS_OUTPUT 
{
   float4 ScreenPos: SV_POSITION;
   float2 TextureCoords: TEXCOORD0;
};

VS_OUTPUT SimpleVS(VS_INPUT In)
{
   VS_OUTPUT Out = (VS_OUTPUT)0;

    Out.ScreenPos = mul(In.position, worldViewProjection);
    Out.TextureCoords = In.UV1;

    return Out;
}

float4 SimplePS(VS_OUTPUT In):   SV_Target
{
    return baseTexture.Sample( baseTextureSS, In.TextureCoords );
}

technique10 Simple
{
   pass Single_Pass
   {
        SetVertexShader( CompileShader( vs_4_0, SimpleVS() ) );
		SetGeometryShader( NULL );
        SetPixelShader( CompileShader( ps_4_0, SimplePS() ) );
		
		SetBlendState(NoBlending, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);
		
		SetRasterizerState(CullNone);

		SetDepthStencilState(DisableDepth, 0);
   }
}